<#assign object = doc.object>
package ${object.package}.service;

import java.util.Set;
import redora.api.BusinessRuleViolation;
import redora.exceptions.BusinessRuleViolationException;
import ${object.package}.service.base.${object.name}BusinessRulesBase;
import ${object.package}.model.${object.name};
import ${object.package}.service.${object.name}Util;

public class ${object.name}BusinessRules extends ${object.name}BusinessRulesBase {
	public ${object.name}BusinessRules(${object.name}Util util) {
		super(util);
	}
	
	@Override
	public Set<BusinessRuleViolation> onInsert(${object.name} pojo) throws BusinessRuleViolationException {
		return super.onInsert(pojo);
	}
	
	@Override
	public Set<BusinessRuleViolation> onUpdate(${object.name} pojo) throws BusinessRuleViolationException {
		//Set<BusinessRuleViolation> retval = super.onUpdate(pojo);
		//for example check if the updateDate is newer then the last updateDate
		//if (pojo.dirty.containsKey(${object.name}Fields.updateDate) {
		//  if (pojo.dirty.get(${object.name}Fields.updateDate) != null && pojo.dirty.get(${object.name}Fields.updateDate).compareTo(pojo.getUpdateDate() > 0) {
		//    retval.add(new BusinessRuleViolation(
		//		${object.name}, ${object.name}Fields.updateDate, BR_1, Action.Update));
		//  }
		//}
		return super.onUpdate(pojo);
	}
	
	@Override
	public Set<BusinessRuleViolation> onDelete(${object.name} pojo) throws BusinessRuleViolationException {
		return super.onDelete(pojo);
	}
}
